<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/template.xhtml">

	<ui:define name="principal">

		<p:dataTable value="#{compromissoBean.compromisso}" var="compromisso">

			<p:column headerText="#{msgs['campos.titulo.reuniao']}">
				<p:outputLabel
					value="#{compromissoBean.compromisso.reuniao.dataReuniao}"
					disabled="true">
					<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="GMT-03:00" />
				</p:outputLabel>
			</p:column>


			<p:column headerText="#{msgs['campos.titulo.numero.compromisso']}">
				<p:outputLabel
					value="#{compromissoBean.compromisso.numeroCompromisso}"
					disabled="true" />

			</p:column>

			<p:column headerText="#{msgs['campos.titulo.prazo.conclusao']}">
				<p:calendar id="popupButtonCal" style="width: 100px;"
					value="#{compromissoBean.compromisso.metaConclusao}" locale="pt_BR" >
				</p:calendar>

			</p:column>

			<p:column headerText="#{msgs['campos.titulo.solicitante']}">
				<p:selectOneMenu
					value="#{compromissoBean.compromisso.solicitante.id}"
					style="width: 164px;">

					<f:selectItems value="#{compromissoBean.listapessoas}">
					</f:selectItems>
				</p:selectOneMenu>

			</p:column>

			<p:column headerText="#{msgs['campos.titulo.responsavel']}">

				<p:selectOneMenu value="#{compromissoBean.idResponsavelSelecionado}"
					style="width: 164px;">
					<f:selectItem itemLabel="#{msgs['campos.combobox.selecione']}"
						itemValue=""></f:selectItem>
					<f:selectItems value="#{compromissoBean.listapessoas}">
					</f:selectItems>
				</p:selectOneMenu>
			</p:column>

			<p:column headerText="#{msgs['campos.titulo.projeto']}">

				<p:selectOneMenu value="#{compromissoBean.compromisso.projeto.id}"
					style="width: 100px;" required="false">
					<f:selectItem itemLabel="#{msgs['campos.combobox.selecione']}"
						itemValue=""></f:selectItem>
					<f:selectItems value="#{compromissoBean.listaprojetos}">
					</f:selectItems>
				</p:selectOneMenu>
			</p:column>

			<p:column headerText="#{msgs['campos.titulo.descricao']}">
				<p:inputTextarea rows="3" style="width: 165px;" maxlength="255"
					autoResize="false" value="#{compromissoBean.compromisso.descricao}" />
			</p:column>
		</p:dataTable>
	</ui:define>
	<ui:define name="botoes">
		<p:commandButton value="#{msgs['botoes.salvar']}"
			action="#{compromissoBean.salvarEdicaoDeValidacao()}" ajax="false" />
			
<p:commandButton value="#{msgs['botoes.cancelar']}"
			action="#{compromissoBean.cancelarRevisaoDoCompromisso()}"
			ajax="false" />
	</ui:define>
</ui:composition>
</html>